package com.zwt.controller;

import com.zwt.domain.TsPlatformUser;
import com.zwt.mq.TestSender;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by zwt on 2018/9/13.
 */
@RestController
@RequestMapping("mq")
public class MqController {

    @Autowired
    private TestSender testSender;


    @RequestMapping("testMq")
    public String testMq(){
        TsPlatformUser tsPlatformUser = new TsPlatformUser();
        tsPlatformUser.setNick("rabbit");
        tsPlatformUser.setId(1l);
        testSender.send(tsPlatformUser);
        return "success";
    }

}
